//
// Created by 郝羽 on 2018/5/15.
//

#ifndef RTC_XSWITCH2_REMOTE_CONNECTOR_HPP
#define RTC_XSWITCH2_REMOTE_CONNECTOR_HPP

#include <string>

#include "xrtc_endpoint.h"

class remote_connector_manager;

class remote_connector;

class remote_linker;

struct linker_status {
    int status;
    bool audio;
    bool video;
    bool update;
};

remote_connector_manager* rcm_new(GMainContext*);

void rcm_del(remote_connector_manager *);

linker_status rcm_add_linker(remote_connector_manager* rcm,
        const char* pub_rtc_id, rtc_endpoint_t sub_rtc,
        std::vector<uint32_t> &audio_ssrcs, std::vector<uint32_t> &video_ssrcs);

linker_status rcm_del_linker(remote_connector_manager* rcm, const char* pub_rtc_id, rtc_endpoint_t sub_rtc);

const char* rcm_get_address(remote_connector_manager* rcm, const char* rtc_id);

//void                      rcm_add_mixer(remote_connector_manager* rcm, const char* pub_rtc_id, mixer_t mixer);
//
//void                      rcm_del_mixer(remote_connector_manager* rcm, const char* pub_rtc_id, mixer_t mixer);
//
//struct rcm_callback {
//    void (*rcm_callback_remote_data)(const char* buf, int size);
//    void (*rcm_callback_remote_destroy)();
//};
//
//typedef int rcm_callback_id;
//
//rcm_callback_id           rcm_callback_register(remote_connector_manager* rcm, const char* pub_rtc_id, rcm_callback& callback);
//
//void                      rcm_callback_unregister(remote_connector_manager* rcm, const char* pub_rtc_id, rcm_callback_id);


#endif //RTC_XSWITCH2_REMOTE_CONNECTOR_HPP
